/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bugsandcritters;

import java.awt.image.BufferedImage;
import java.awt.*;
import javax.imageio.ImageIO;
import java.io.File;
/**
 *
 * @author Student
 */
public class PauseButton extends HudBasic
{
    public static BufferedImage PauseImage;
    
    @Override
    public void Create()
    {
        X = 900;
        Y = 550;
        Width = 48;
        Height = 48;
        super.Create();
    }
    
    @Override
    public void OnClick()
    {
        GameManager.Paused = true;
    }
    
    @Override
    public void Draw(Graphics g)
    {
         if(PauseImage == null)
        {
            try
            {
                PauseImage = ImageIO.read(new File("PauseImage.png"));
            }
            catch(Exception e){}
        }
        else
        {
            BufferedImage image = PauseImage;
            g.drawImage(image, (X), 
                    (Y),
                    (Width),
                    (Height),
                    null);
        }
    }
    
}
